找传奇、传世资源到传世资源站!

Html5+JavaScript经典塔防游戏runner源码

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

Html5经典塔防游戏runner源码
Html5+JavaScript经典塔防游戏runner源码 网页游戏-第1张
Html JavaScript游戏源码Runner.loadImage = function()
{
var img = new Image();
img.onload = Runner.imgLoadHandler;
img.src = imageURLs.shift();
ImageManager.push(img);
document.getElementById("status").innerHTML = "Loading(" loaded "/6)" ": " img.src;
}

Runner.imgLoadHandler = function(e)
{
loaded ;
if(imageURLs.length > 0) Runner.loadImage();
else 
{
document.getElementById("status").innerHTML = "";
document.getElementById("main").style.backgroundImage = "url(" ImageManager[0].src ")";
window.Astar = casual.Astar;

//init canvas
canvas = document.getElementById("canvas");
canvas.width = 1200;
canvas.height = 580;
//disabled canvas right menu
canvas.oncontextmenu = function(){return false;};
context = canvas.getContext("2d");
//ready, go
ImageManager.init();
Runner.createGame();
}
}

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复